package com.example.loadimg_sdk;

import android.widget.ImageView;

import com.bumptech.glide.load.resource.bitmap.CircleCrop;

public class ImgLoad {
    public static void loadMatchImg(String url, ImageView imageView){
        GlideApp.with(imageView.getContext())
                .load(url)
                .placeholder(R.drawable.preview)
                .error(R.drawable.preview)
                .into(imageView);
    }

    public static void loadCircleImg(String url, ImageView imageView){
        GlideApp.with(imageView.getContext())
                .load(url)
                .placeholder(R.drawable.preview)
                .error(R.drawable.preview)
                .transforms(new CircleCrop())
                .into(imageView);
    }
}
